package org.luxor.eshop.order.entity.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.luxor.commons.core.validator.group.AddGroup;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;

/**
 * 商品订单
 *
 * @author Mr.Yan  @date: 2020/11/24
 */
@Data
public class OrderDto {

    @ApiModelProperty(value = "订单号")
    @NotNull(message = "订单号，不能为空", groups = AddGroup.class)
    private Long orderId;

    @ApiModelProperty(value = "买家账户")
    @NotBlank(message = "买家账户，不能为空", groups = AddGroup.class)
    private String account;

    @ApiModelProperty(value = "商品列表")
    @NotNull(message = "商品列表，不能为空", groups = AddGroup.class)
    private List<CommodityDto> commodityList;

    @ApiModelProperty(value = "总金额")
    @NotNull(message = "总金额，不能为空", groups = AddGroup.class)
    private BigDecimal money;
}
